<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%String path = request.getContextPath();%>

<form id="pagerForm" method="post" action="<%=path %>/rechargeLog/listRechargeLog.action">
	<input type="hidden" name="pageRequest" value="1" />
	<input type="hidden" name="pageNum" value="${paginator.pageIndex}" />
	<input type="hidden" name="numPerPage" value="${paginator.pageSize}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" rel="pagerForm" action="<%=path %>/rechargeLog/listRechargeLog.action" method="post">
	<div class="searchBar"  style="height:80px;">
		<ul class="searchContent">
			<li>
				<label style="text-align: right;">会员卡：</label>
				<input name="rechargeLogVO.memberCardId" value="<s:property value="rechargeLogVO.memberCardId" />" type="hidden">
				<input onclick="$('#rechargeLogList_a_btnLook1').trigger('click');" style="cursor: pointer;float: left;" name="rechargeLogVO.memberName" value="<s:property value="rechargeLogVO.memberName" />" >
				<!-- <a class="btnLook" id="rechargeLogList_a_btnLook1" href="<%=path %>/memberCard/listMemberCard.action?searchType=lookup" lookupGroup="rechargeLogVO">选择</a> -->
			</li>
			<li>
				<label style="text-align: right;">会员卡号：</label>
				<input onclick="$('#rechargeLogList_a_btnLook2').trigger('click');" style="cursor: pointer;float: left;" name="rechargeLogVO.memberCode" value="<s:property value="rechargeLogVO.memberCode" />" >
				<!-- <a class="btnLook" id="rechargeLogList_a_btnLook2" href="<%=path %>/memberCard/listMemberCard.action?searchType=lookup" lookupGroup="rechargeLogVO">选择</a> -->
			</li>
			<li>
				<label style="text-align: right;">操作人：</label>
				<input name="rechargeLogVO.operatorId" value="<s:property value="rechargeLogVO.operatorId" />" type="hidden">
				<input onclick="$('#rechargeLogList_a_btnLook3').trigger('click');" style="cursor: pointer;float: left;" name="rechargeLogVO.operatorName" value="<s:property value="rechargeLogVO.operatorName" />" >
				<!-- <a class="btnLook" id="rechargeLogList_a_btnLook3" href="<%=path %>/user/listUser.action?searchType=lookup" lookupGroup="rechargeLogVO">选择</a> -->
			</li>
		</ul>
		<ul class="searchContent">
			<li>
				<label style="text-align: right;">金额(积分)：</label>
				大于<input type="text" name="rechargeLogVO.gtmoney" value="${rechargeLogVO.gtmoney}" class="number" size="5"/>
				小于<input type="text" name="rechargeLogVO.ltmoney" value="${rechargeLogVO.ltmoney}" class="number" size="5"/>
			</li>
			<li>
				<label style="text-align: right;">次数：</label>
				大于<input type="text" name="rechargeLogVO.gtcount" value="${rechargeLogVO.gtcount}" class="number" size="5"/>
				小于<input type="text" name="rechargeLogVO.ltcount" value="${rechargeLogVO.ltcount}" class="number" size="5"/>
			</li>
			<li>
				<label style="text-align: right;">商品：</label>
				<input name="rechargeLogVO.productId" value="<s:property value="rechargeLogVO.productId" />" type="hidden">
				<input onclick="$('#rechargeLogList_a_btnLook4').trigger('click');" style="cursor: pointer;float: left;" name="rechargeLogVO.productName" value="<s:property value="rechargeLogVO.productName" />" >
				<!-- <a class="btnLook" id="rechargeLogList_a_btnLook4" href="<%=path %>/product/listProduct.action?searchType=lookup" lookupGroup="rechargeLogVO">选择</a> -->
			</li>
		</ul>
		<ul class="searchContent">
			<li>
				<label style="text-align: right;">充值类型：</label>
				<select name="rechargeLogVO.type" id="rechargeLogType">
                   	<option value="">==选择类型==</option>
					<c:forEach var="item" items="${rechargeTypes}">
                        <option value="${item.name}" ${rechargeLogVO.type eq item.name ? "selected" : "" }>${item.title}</option>
					</c:forEach>
				</select>
			</li>
			<c:if test="${SESSION_USER.customer != null}">
				<input name="rechargeLogVO.customerId" value="${SESSION_USER.customer.id}" type="hidden">
			</c:if>
			<c:if test="${SESSION_USER.customer == null}">
				<li>
					<label style="text-align: right;">所属商家：</label>
					<input name="rechargeLogVO.customerId" value="<s:property value="rechargeLogVO.customer.id" />" type="hidden">
					<input name="rechargeLogVO.customerName" onclick="$('#rechargeLogList_a_btnLook5').trigger('click');" style="cursor: pointer;float: left;" value="<s:property value="rechargeLogVO.customerName" />" >
					<!-- <a class="btnLook" id="rechargeLogList_a_btnLook5" href="<%=path %>/customer/listCustomer.action?searchType=favourableEntity" lookupGroup="rechargeLogVO">选择</a> -->
				</li>
			</c:if>
			<li style="width:450px">
				<label style="text-align: right;">充值时间段：</label>
				大于<input type="text" name="rechargeLogVO.gtcreateDate" value="${rechargeLogVO.gtcreateDateStr}" dateFmt="yyyy-MM-dd HH:mm:ss" class="date" readonly="false" size="19"/>
				小于<input type="text" name="rechargeLogVO.ltcreateDate" value="${rechargeLogVO.ltcreateDateStr}"  dateFmt="yyyy-MM-dd HH:mm:ss" class="date" readonly="false" size="19"/>
			</li>
		</ul>
		<div class="subBar" style="height:10px;">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<!-- 
			<li><a class="add" href="<%=path %>/rechargeLog/addRechargeLog.action" target="navTab"><span>添加</span></a></li>
			<li><a title="确实要删除这些记录吗?" target="selectedTodo" rel="key" postType="string" href="<%=path %>/rechargeLog/deleteRechargeLog.action" class="delete"><span>删除</span></a></li>
			<li><a class="edit" href="<%=path %>/rechargeLog/editRechargeLog.action?rechargeLogVO.id={sid_user}" target="navTab" warn="请选择一条记录"><span>修改</span></a></li>
			 -->
		</ul>
	</div>
	<table class="table" width="1150" layoutH="189">
		<thead>
			<tr>
				<!-- <th width="30"><input type="checkbox" group="ids" class="checkboxCtrl"></th> -->
				<th width="80">充值类型</th>
				<th width="80">会员卡/商家</th>
				<th width="120">会员卡号/商家编码</th>
				<th width="80">商品</th>
				<th width="80">金额(积分)</th>
				<th width="80">次数</th>
				<th width="80">操作人</th>
				<th width="80">说明</th>
				<th width="100">充值时间</th>
				<th width="70">操作</th>
			</tr>
		</thead>
		<tbody>
			<s:iterator value="rechargeLogList" id="rechargeLog" status="st">
				<tr target="sid_user" rel="<s:property value="id" />">
				<!--	<td><input name="key" value="<s:property value="id" />" type="checkbox"></td> -->
             <td>
             	<s:if test="%{#rechargeLog.type == 'CUSTOMER'}">商家余额充值</s:if>
              	<s:else>
					<s:property value="typeTitle" />
				</s:else>
             </td>	
             
             <s:if test="%{#rechargeLog.type == 'CUSTOMER'}">
             	<td>
					<s:property value="customer.name" />
				</td>
				<td>
					<s:property value="customer.code" />
				</td>
			</s:if>
             <s:else>
             	<td>
					<s:property value="membercard.memberName" />
				</td>
				<td>
					<s:property value="membercard.schemeCode" />
				</td>
			</s:else>
             
             <td><s:property value="product.name" /></td>
             <td><s:property value="money" /></td>
             <td><s:property value="count" /></td>
             <td><s:property value="operator.name" /></td>
             <td><s:property value="description" /></td>	
	<td><s:date name="createDate" format="yyyy-MM-dd HH:mm:ss" /></td>
					<td>
						<!-- 
						<a title="确实要删除这条记录吗?" target="ajaxTodo" href="<%=path %>/rechargeLog/deleteRechargeLog.action?key=<s:property value="id" />" class="btnDel">删除</a>
						<a title="编辑" target="navTab" href="<%=path %>/rechargeLog/editRechargeLog.action?rechargeLogVO.id=<s:property value="id" />" class="btnEdit">编辑</a>
						-->
					</td>
				</tr>
			</s:iterator>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
				<span>显示</span>
				<select class="combox" name="numPerPage" oncharge="navTabPageBreak({numPerPage:this.value})">
					<option value="15" <c:if test="${paginator.pageSize==15}">selected='selected'</c:if> >15</option>
					<option value="30" <c:if test="${paginator.pageSize==30}">selected='selected'</c:if> >30</option>
					<option value="50" <c:if test="${paginator.pageSize==50}">selected='selected'</c:if> >50</option>
					<option value="100" <c:if test="${paginator.pageSize==100}">selected='selected'</c:if> >100</option>
					<option value="200" <c:if test="${paginator.pageSize==200}">selected='selected'</c:if> >200</option>
				</select>
				<span>条，共${paginator.totalCount}条</span>
			</div>
			<div class="pagination" targetType="navTab" totalCount="${paginator.totalCount}" 
				numPerPage="${paginator.pageSize}" pageNumShown="10" currentPage="${paginator.pageIndex}"></div>
	</div>
</div>